using Common.Commands;
using Sanelib.DataOperation;
using Sanelib.DataOperation.Impl;
using StructureMap.Configuration.DSL;

namespace Core.Infrastructure.StructureMap
{
    public class CoreRegistry : Registry
    {
        public CoreRegistry()
        {
            Scan(x =>
                     {
                         x.TheCallingAssembly();
                         x.WithDefaultConventions();
                         x.AssemblyContainingType<ICommand>();
                         x.ConnectImplementationsToTypesClosing(typeof(ICommandProcessor<>));
                     });           

            For(typeof(IRepository<>)).Add(typeof(Repository<>));
        }
    }
}